package com.v5ba.event2;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class AddUserListener implements ApplicationListener<AddUserEvent> {
    @Override
    public void onApplicationEvent(AddUserEvent addUserEvent) {
        AddUser addUser = (AddUser) addUserEvent.getSource();
        System.out.println("AddUserListener:"+addUser.getName());
    }
}
